<?php
/**
 * Controle de Credencial
 * @filesource  06/04/2011
 * @author      Estrada Virtual <http://estradavirtual.com.br>
 * @copyright   Copyright <2011> Estrada Virtual
 * @package     <<application>>
 * @subpackage  <<application>>.application.controllers
 * @version     $Id$
 */
class CredencialController extends App_Controller_Crud
{

    public function adicionarAction()
    {
        $this->_helper->layout()->disableLayout();
        $fkCliente =$this->_getParam('fk_cliente');
        if ($this->getRequest()->isPost()) {
            $model = new Model_Credencial();
            $row = $model->createRow($this->_getAllParams());
            $row->save();
            $this->_addMessage('Credencial adicionada', 'corporativo/cliente/visualizar/id/' . $fkCliente);
        }
        $this->view->fk_cliente = $fkCliente;
    }
}
